class ReciteTask extends Scene{
    private StartRecite_Img:eui.Image;
    private StudyDay_label:eui.Label;//学习天数
    private ReciteTaskBack:eui.Image;//返回四级界面
    private ReciteNum_input:eui.TextInput;
    private CoinNum_Label:eui.Label;//预计金币个数标签；
    private Book_Img:eui.Image;
    public constructor(){
        super();
        this.skinName="resource/skins/scene/ReciteTask.exml";
    }
    public onSkinLoaded():void{
        this.StudyDay_label.text="1";
        this.ReciteTaskBack.addEventListener(egret.TouchEvent.TOUCH_TAP,this.btnHandler,this);
        this.StartRecite_Img.addEventListener(egret.TouchEvent.TOUCH_TAP,this.btnHandler,this);
        this.ReciteNum_input.addEventListener(egret.Event.CHANGE,this.btnHandler,this);
        this.Book_Img.addEventListener(egret.TouchEvent.TOUCH_TAP,this.btnHandler,this);
    }
    private btnHandler(evt: egret.TouchEvent) {
		let btnFocused = evt.currentTarget;
		switch (btnFocused) {
            case this.StartRecite_Img:
                SceneManager.instance.addScene(new ReciteScene());
                break;
            case this.ReciteTaskBack:
                SceneManager.instance.removeScene(this);
                break;
            case this.ReciteNum_input:
                this.CoinNum_Label.text=(parseInt((this.ReciteNum_input.textDisplay.text))/5).toString();
                break;
            case this.Book_Img:
                SceneManager.instance.addScene(new ErrorBook());
                break;
                
		}
	} 
}